package com.huitu.whht.base.core.api.wrem.person;

import com.huitu.api.rest.AbstractApiResource;
import com.huitu.commons.PageUtils;
import com.huitu.whht.api.core.common.response.ApiResultBuilder;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiResource;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiService;
import com.huitu.whht.api.core.common.response.StatusRespBuilder;

import com.huitu.whht.base.core.api.wrem.person.entities.WremPersonB;

import com.huitu.whht.base.core.api.wrem.person.entities.WremPersonBQo;
import com.huitu.whht.base.core.api.wrem.person.service.IWremPersonBService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**
 * 说明: 应急专家及管理人员基本信息表API,表名称: T_WHHT_WREM_PERSON_B <br/>
 * 日期: 2019-04-11
 * @author LiuCW
 */
@Component
@SzyCoreApiResource
@Path("generate/person/b")
public class WremPersonBResource extends AbstractApiResource {

    private static final Logger LOGGER = LoggerFactory.getLogger(WremPersonBResource.class);

    private static final String UUID = "55a3aa69-38b6-41ea-8a55-007389a141c2";

    @Override
    public String getUUID() {
        return UUID;
    }

    @Autowired
    @SzyCoreApiService
    IWremPersonBService wremPersonBService;

    /**
     * @api {get} generate/person/b/{personId} [R][G]根据主键查询
     * @apiDescription [G]根据主键查询T_WHHT_WREM_PERSON_B(应急专家及管理人员基本信息表)数据
     * @apiName (generate)select by primary key
     * @apiGroup WREM_PERSON_B-应急专家及管理人员基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest generate/person/b/57df579e-befd-4878-8b62-523e7c73578a
     * @apiParam   {String}         personId           【必须】人员ID
     * @apiSuccess {String}         personId           人员ID
     * @apiSuccess {String}         personNm           人员姓名
     * @apiSuccess {String}         personTp           人员类别(专家/行政管理人员)
     * @apiSuccess {String}         sex                性别
     * @apiSuccess {Date}           birthday           出生日期(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {String}         birthPlace         籍贯
     * @apiSuccess {String}         nation             民族
     * @apiSuccess {String}         party              党派
     * @apiSuccess {String}         post               职务
     * @apiSuccess {String}         title              职称
     * @apiSuccess {String}         orgNm              所在单位名称
     * @apiSuccess {String}         isJob              是否在职
     * @apiSuccess {String}         studyMajor         所学专业
     * @apiSuccess {String}         currentMajor       现从事专业
     * @apiSuccess {String}         degree             最高学历
     * @apiSuccess {String}         allowanceTp        享受津贴类别
     * @apiSuccess {String}         cv                 简历
     * @apiSuccess {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {String}         personCardNo       身份证
     * @apiSuccess {String}         personTel          联系方式
     * @apiSuccess {String}         personAddress      家庭住址
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "personId": "57df579e-befd-4878-8b62-523e7c73578a",
     * "personNm": "张三",
     * "personTp": "1",
     * "sex": "1",
     * "birthday": "1993-01-01 00:00:00.0",
     * "birthPlace": null,
     * "nation": null,
     * "party": null,
     * "post": null,
     * "title": null,
     * "orgNm": null,
     * "isJob": null,
     * "studyMajor": null,
     * "currentMajor": null,
     * "degree": null,
     * "allowanceTp": null,
     * "cv": null,
     * "ts": "2018-12-18 18:13:02.0",
     * "personCardNo": "420114197002031234",
     * "personTel": "13407182233",
     * "personAddress": null
     *  }
     * }
     * @apiUse exceptions
     */
    @GET
    @Path("{personId}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectByPrimaryKey(@PathParam("personId") String personId) {
        LOGGER.info("根据主键查询 应急专家及管理人员基本信息表,参数 personId:{}", personId);
        return Response.ok(ApiResultBuilder.create(this, wremPersonBService.selectByPrimaryKey(personId))).build();
    }

    /**
     * @api {post} generate/person/b/list [R][G]根据条件查询
     * @apiDescription [G]根据条件查询T_WHHT_WREM_PERSON_B(应急专家及管理人员基本信息表)数据
     * @apiName (generate)select by filter
     * @apiGroup WREM_PERSON_B-应急专家及管理人员基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest generate/person/b/list
     * @apiParam   {List(String)}   personIdList       (数组)人员ID
     * @apiParam   {String}         personId           人员ID
     * @apiParam   {String}         personNm           人员姓名
     * @apiParam   {List(String)}   personTpList       (数组)人员类别(专家/行政管理人员)
     * @apiParam   {List(String)}   sexList            (数组)性别
     * @apiParam   {Date}           birthdayBgTm       (开始时间)出生日期
     * @apiParam   {Date}           birthdayEdTm       (结束时间)出生日期
     * @apiParam   {String}         birthPlace         籍贯
     * @apiParam   {String}         nation             民族
     * @apiParam   {String}         party              党派
     * @apiParam   {String}         post               职务
     * @apiParam   {String}         title              职称
     * @apiParam   {String}         orgNm              所在单位名称
     * @apiParam   {List(String)}   isJobList          (数组)是否在职
     * @apiParam   {String}         studyMajor         所学专业
     * @apiParam   {String}         currentMajor       现从事专业
     * @apiParam   {String}         degree             最高学历
     * @apiParam   {List(String)}   allowanceTpList    (数组)享受津贴类别
     * @apiParam   {String}         cv                 简历
     * @apiParam   {Date}           tsBgTm             (开始时间)时间戳
     * @apiParam   {Date}           tsEdTm             (结束时间)时间戳
     * @apiParam   {String}         personCardNo       身份证
     * @apiParam   {String}         personTel          联系方式
     * @apiParam   {String}         personAddress      家庭住址
     * @apiSuccess {String}         personId           人员ID
     * @apiSuccess {String}         personNm           人员姓名
     * @apiSuccess {String}         personTp           人员类别(专家/行政管理人员)
     * @apiSuccess {String}         sex                性别
     * @apiSuccess {Date}           birthday           出生日期
     * @apiSuccess {String}         birthPlace         籍贯
     * @apiSuccess {String}         nation             民族
     * @apiSuccess {String}         party              党派
     * @apiSuccess {String}         post               职务
     * @apiSuccess {String}         title              职称
     * @apiSuccess {String}         orgNm              所在单位名称
     * @apiSuccess {String}         isJob              是否在职
     * @apiSuccess {String}         studyMajor         所学专业
     * @apiSuccess {String}         currentMajor       现从事专业
     * @apiSuccess {String}         degree             最高学历
     * @apiSuccess {String}         allowanceTp        享受津贴类别
     * @apiSuccess {String}         cv                 简历
     * @apiSuccess {Date}           ts                 时间戳
     * @apiSuccess {String}         personCardNo       身份证
     * @apiSuccess {String}         personTel          联系方式
     * @apiSuccess {String}         personAddress      家庭住址
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "personId": "57df579e-befd-4878-8b62-523e7c73578a",
     * "personNm": "张三",
     * "personTp": "1",
     * "sex": "1",
     * "birthday": "1993-01-01 00:00:00.0",
     * "birthPlace": null,
     * "nation": null,
     * "party": null,
     * "post": null,
     * "title": null,
     * "orgNm": null,
     * "isJob": null,
     * "studyMajor": null,
     * "currentMajor": null,
     * "degree": null,
     * "allowanceTp": null,
     * "cv": null,
     * "ts": "2018-12-18 18:13:02.0",
     * "personCardNo": "420114197002031234",
     * "personTel": "13407182233",
     * "personAddress": null
     *  }]
     * }
     *
     * @apiSuccessExample 分页请求:
     * request header: Rang={max=50;size=50;field=TS DESC}
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "personId": "57df579e-befd-4878-8b62-523e7c73578a",
     * "personNm": "张三",
     * "personTp": "1",
     * "sex": "1",
     * "birthday": "1993-01-01 00:00:00.0",
     * "birthPlace": null,
     * "nation": null,
     * "party": null,
     * "post": null,
     * "title": null,
     * "orgNm": null,
     * "isJob": null,
     * "studyMajor": null,
     * "currentMajor": null,
     * "degree": null,
     * "allowanceTp": null,
     * "cv": null,
     * "ts": "2018-12-18 18:13:02.0",
     * "personCardNo": "420114197002031234",
     * "personTel": "13407182233",
     * "personAddress": null
     *  }],
     * "paging": {
     * "count": 3,
     * "total": 120,
     * "finale": false,
     * "index": 1
     * }
     * }
     * @apiUse header_rang
     * @apiUse exceptions
     */
    @POST
    @Path("list")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectList(WremPersonBQo filter) {
        PageUtils.startPageFromRang();
        LOGGER.info("根据条件查询 应急专家及管理人员基本信息表,参数 WremPersonBQo:{}", filter);
        return Response.ok(ApiResultBuilder.create(this, wremPersonBService.selectList(filter))).build();
    }

    /**
     * @api {put} generate/person/b [C][G]新增数据
     * @apiPrivate
     * @apiDescription [G]新增T_WHHT_WREM_PERSON_B(应急专家及管理人员基本信息表)数据
     * @apiName (generate)add data
     * @apiGroup WREM_PERSON_B-应急专家及管理人员基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         personId           【必须】人员ID
     * @apiParam   {String}         personNm           人员姓名
     * @apiParam   {String}         personTp           人员类别(专家/行政管理人员)
     * @apiParam   {String}         sex                性别
     * @apiParam   {Date}           birthday           出生日期(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         birthPlace         籍贯
     * @apiParam   {String}         nation             民族
     * @apiParam   {String}         party              党派
     * @apiParam   {String}         post               职务
     * @apiParam   {String}         title              职称
     * @apiParam   {String}         orgNm              所在单位名称
     * @apiParam   {String}         isJob              是否在职
     * @apiParam   {String}         studyMajor         所学专业
     * @apiParam   {String}         currentMajor       现从事专业
     * @apiParam   {String}         degree             最高学历
     * @apiParam   {String}         allowanceTp        享受津贴类别
     * @apiParam   {String}         cv                 简历
     * @apiParam   {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         personCardNo       身份证
     * @apiParam   {String}         personTel          联系方式
     * @apiParam   {String}         personAddress      家庭住址
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest generate/person/b
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "personId": "57df579e-befd-4878-8b62-523e7c73578a"
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "personId": "57df579e-befd-4878-8b62-523e7c73578a"
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "personId": "57df579e-befd-4878-8b62-523e7c73578a",
     * "personNm": "张三",
     * "personTp": "1",
     * "sex": "1",
     * "birthday": "1993-01-01 00:00:00.0",
     * "birthPlace": null,
     * "nation": null,
     * "party": null,
     * "post": null,
     * "title": null,
     * "orgNm": null,
     * "isJob": null,
     * "studyMajor": null,
     * "currentMajor": null,
     * "degree": null,
     * "allowanceTp": null,
     * "cv": null,
     * "ts": "2018-12-18 18:13:02.0",
     * "personCardNo": "420114197002031234",
     * "personTel": "13407182233",
     * "personAddress": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insert(WremPersonB record) {
        LOGGER.info("新增 应急专家及管理人员基本信息表,参数 WremPersonB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wremPersonBService.insertSelective(record),record))).build();
    }

    /**
     * @api {post} generate/person/b/insertBatch [C][G]批量新增数据
     * @apiPrivate
     * @apiDescription [G]批量新增T_WHHT_WREM_PERSON_B(应急专家及管理人员基本信息表)数据
     * @apiName (generate)addBatch data
     * @apiGroup WREM_PERSON_B-应急专家及管理人员基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         personId           【必须】人员ID
     * @apiParam   {String}         personNm           人员姓名
     * @apiParam   {String}         personTp           人员类别(专家/行政管理人员)
     * @apiParam   {String}         sex                性别
     * @apiParam   {Date}           birthday           出生日期(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         birthPlace         籍贯
     * @apiParam   {String}         nation             民族
     * @apiParam   {String}         party              党派
     * @apiParam   {String}         post               职务
     * @apiParam   {String}         title              职称
     * @apiParam   {String}         orgNm              所在单位名称
     * @apiParam   {String}         isJob              是否在职
     * @apiParam   {String}         studyMajor         所学专业
     * @apiParam   {String}         currentMajor       现从事专业
     * @apiParam   {String}         degree             最高学历
     * @apiParam   {String}         allowanceTp        享受津贴类别
     * @apiParam   {String}         cv                 简历
     * @apiParam   {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         personCardNo       身份证
     * @apiParam   {String}         personTel          联系方式
     * @apiParam   {String}         personAddress      家庭住址
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest generate/person/b/insertBatch
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "personId": "57df579e-befd-4878-8b62-523e7c73578a"
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "personId": "57df579e-befd-4878-8b62-523e7c73578a"
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "personId": "57df579e-befd-4878-8b62-523e7c73578a",
     * "personNm": "张三",
     * "personTp": "1",
     * "sex": "1",
     * "birthday": "1993-01-01 00:00:00.0",
     * "birthPlace": null,
     * "nation": null,
     * "party": null,
     * "post": null,
     * "title": null,
     * "orgNm": null,
     * "isJob": null,
     * "studyMajor": null,
     * "currentMajor": null,
     * "degree": null,
     * "allowanceTp": null,
     * "cv": null,
     * "ts": "2018-12-18 18:13:02.0",
     * "personCardNo": "420114197002031234",
     * "personTel": "13407182233",
     * "personAddress": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("insertBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insertBatch(List<WremPersonB> recordList) {
        LOGGER.info("批量新增 应急专家及管理人员基本信息表,参数 WremPersonB:[]", recordList);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wremPersonBService.insertBatch(recordList),recordList))).build();
    }

    /**
     * @api {put} generate/person/b/{personId}/update [U][G]根据主键修改
     * @apiPrivate
     * @apiDescription [G]根据主键修改T_WHHT_WREM_PERSON_B(应急专家及管理人员基本信息表)数据
     * @apiName (generate)update data
     * @apiGroup WREM_PERSON_B-应急专家及管理人员基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         personId           【必须】人员ID
     * @apiParam   {String}         personNm           人员姓名
     * @apiParam   {String}         personTp           人员类别(专家/行政管理人员)
     * @apiParam   {String}         sex                性别
     * @apiParam   {Date}           birthday           出生日期
     * @apiParam   {String}         birthPlace         籍贯
     * @apiParam   {String}         nation             民族
     * @apiParam   {String}         party              党派
     * @apiParam   {String}         post               职务
     * @apiParam   {String}         title              职称
     * @apiParam   {String}         orgNm              所在单位名称
     * @apiParam   {String}         isJob              是否在职
     * @apiParam   {String}         studyMajor         所学专业
     * @apiParam   {String}         currentMajor       现从事专业
     * @apiParam   {String}         degree             最高学历
     * @apiParam   {String}         allowanceTp        享受津贴类别
     * @apiParam   {String}         cv                 简历
     * @apiParam   {Date}           ts                 时间戳
     * @apiParam   {String}         personCardNo       身份证
     * @apiParam   {String}         personTel          联系方式
     * @apiParam   {String}         personAddress      家庭住址
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest generate/person/b/57df579e-befd-4878-8b62-523e7c73578a/update
     * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "personId": "57df579e-befd-4878-8b62-523e7c73578a",
     * "personNm": "张三",
     * "personTp": "1",
     * "sex": "1",
     * "birthday": "1993-01-01 00:00:00.0",
     * "birthPlace": null,
     * "nation": null,
     * "party": null,
     * "post": null,
     * "title": null,
     * "orgNm": null,
     * "isJob": null,
     * "studyMajor": null,
     * "currentMajor": null,
     * "degree": null,
     * "allowanceTp": null,
     * "cv": null,
     * "ts": "2018-12-18 18:13:02.0",
     * "personCardNo": "420114197002031234",
     * "personTel": "13407182233",
     * "personAddress": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{personId}/update")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response update(@PathParam("personId") String personId, WremPersonB record) {
        record.setPersonId(personId);
        LOGGER.info("根据主键修改 应急专家及管理人员基本信息表,参数 WremPersonB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wremPersonBService.updateByPrimaryKey(record)))).build();
    }

    /**
     * @api {put} generate/person/b/{personId}/update-selective [U][G]根据主键修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据主键修改T_WHHT_WREM_PERSON_B(应急专家及管理人员基本信息表)数据,只修改非null字段
     * @apiName (generate)update selected data
     * @apiGroup WREM_PERSON_B-应急专家及管理人员基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         personId           人员ID
     * @apiParam   {String}         personNm           人员姓名
     * @apiParam   {String}         personTp           人员类别(专家/行政管理人员)
     * @apiParam   {String}         sex                性别
     * @apiParam   {Date}           birthday           出生日期
     * @apiParam   {String}         birthPlace         籍贯
     * @apiParam   {String}         nation             民族
     * @apiParam   {String}         party              党派
     * @apiParam   {String}         post               职务
     * @apiParam   {String}         title              职称
     * @apiParam   {String}         orgNm              所在单位名称
     * @apiParam   {String}         isJob              是否在职
     * @apiParam   {String}         studyMajor         所学专业
     * @apiParam   {String}         currentMajor       现从事专业
     * @apiParam   {String}         degree             最高学历
     * @apiParam   {String}         allowanceTp        享受津贴类别
     * @apiParam   {String}         cv                 简历
     * @apiParam   {Date}           ts                 时间戳
     * @apiParam   {String}         personCardNo       身份证
     * @apiParam   {String}         personTel          联系方式
     * @apiParam   {String}         personAddress      家庭住址
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest generate/person/b/57df579e-befd-4878-8b62-523e7c73578a/update-selective
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "personId": "57df579e-befd-4878-8b62-523e7c73578a",
     * "personNm": "张三",
     * "personTp": "1",
     * "sex": "1",
     * "birthday": "1993-01-01 00:00:00.0",
     * "birthPlace": null,
     * "nation": null,
     * "party": null,
     * "post": null,
     * "title": null,
     * "orgNm": null,
     * "isJob": null,
     * "studyMajor": null,
     * "currentMajor": null,
     * "degree": null,
     * "allowanceTp": null,
     * "cv": null,
     * "ts": "2018-12-18 18:13:02.0",
     * "personCardNo": "420114197002031234",
     * "personTel": "13407182233",
     * "personAddress": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{personId}/update-selective")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateSelective(@PathParam("personId") String personId, WremPersonB record) {
        record.setPersonId(personId);
        LOGGER.info("根据主键修改(只修改非null字段) 应急专家及管理人员基本信息表,参数 WremPersonB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wremPersonBService.updateByPrimaryKeySelective(record)))).build();
    }

    /**
     * @api {post} generate/person/b/updateBatch [U][G]根据主键批量修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据批量主键修改T_WHHT_WREM_PERSON_B(应急专家及管理人员基本信息表)数据,只修改非null字段
     * @apiName (generate)updateBatch selected data
     * @apiGroup WREM_PERSON_B-应急专家及管理人员基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         personId           人员ID
     * @apiParam   {String}         personNm           人员姓名
     * @apiParam   {String}         personTp           人员类别(专家/行政管理人员)
     * @apiParam   {String}         sex                性别
     * @apiParam   {Date}           birthday           出生日期
     * @apiParam   {String}         birthPlace         籍贯
     * @apiParam   {String}         nation             民族
     * @apiParam   {String}         party              党派
     * @apiParam   {String}         post               职务
     * @apiParam   {String}         title              职称
     * @apiParam   {String}         orgNm              所在单位名称
     * @apiParam   {String}         isJob              是否在职
     * @apiParam   {String}         studyMajor         所学专业
     * @apiParam   {String}         currentMajor       现从事专业
     * @apiParam   {String}         degree             最高学历
     * @apiParam   {String}         allowanceTp        享受津贴类别
     * @apiParam   {String}         cv                 简历
     * @apiParam   {Date}           ts                 时间戳
     * @apiParam   {String}         personCardNo       身份证
     * @apiParam   {String}         personTel          联系方式
     * @apiParam   {String}         personAddress      家庭住址
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest  generate/person/b/updateBatch
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "personId": "57df579e-befd-4878-8b62-523e7c73578a",
     * "personNm": "张三",
     * "personTp": "1",
     * "sex": "1",
     * "birthday": "1993-01-01 00:00:00.0",
     * "birthPlace": null,
     * "nation": null,
     * "party": null,
     * "post": null,
     * "title": null,
     * "orgNm": null,
     * "isJob": null,
     * "studyMajor": null,
     * "currentMajor": null,
     * "degree": null,
     * "allowanceTp": null,
     * "cv": null,
     * "ts": "2018-12-18 18:13:02.0",
     * "personCardNo": "420114197002031234",
     * "personTel": "13407182233",
     * "personAddress": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("updateBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateBatch(List<WremPersonB> record) {
        LOGGER.info("根据主键批量修改(只修改非null字段) 应急专家及管理人员基本信息表,参数 WremPersonB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wremPersonBService.updateBatch(record)))).build();
    }

    /**
     * @api {delete} generate/person/b/{personId} [D][G]根据主键删除
     * @apiPrivate
     * @apiDescription [G]根据主键删除T_WHHT_WREM_PERSON_B(应急专家及管理人员基本信息表)数据
     * @apiName (generate)delete by primary key
     * @apiGroup WREM_PERSON_B-应急专家及管理人员基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest generate/person/b/57df579e-befd-4878-8b62-523e7c73578a
     * @apiParam   {String}         personId           【必须】人员ID
     * @apiSuccess {Integer}        status             1:删除成功;0:要删除的数据不存在(可能已被删除).
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("{personId}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response delete(@PathParam("personId") String personId) {
        LOGGER.info("根据主键删除 应急专家及管理人员基本信息表,参数 personId:{}", personId);
        Integer rows = wremPersonBService.deleteByPrimaryKey(personId);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }

    /**
     * @api {delete} generate/person/b/by-filter [D][G]根据条件删除
     * @apiPrivate
     * @apiDescription [G]根据条件删除T_WHHT_WREM_PERSON_B(应急专家及管理人员基本信息表)数据
     * @apiName (generate)delete by filter
     * @apiGroup WREM_PERSON_B-应急专家及管理人员基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest generate/person/b/by-filter
     * @apiParam   {List(String)}   personIdList       (数组)人员ID
     * @apiParam   {String}         personId           人员ID
     * @apiParam   {String}         personNm           人员姓名
     * @apiParam   {List(String)}   personTpList       (数组)人员类别(专家/行政管理人员)
     * @apiParam   {List(String)}   sexList            (数组)性别
     * @apiParam   {Date}           birthdayBgTm       (开始时间)出生日期
     * @apiParam   {Date}           birthdayEdTm       (结束时间)出生日期
     * @apiParam   {String}         birthPlace         籍贯
     * @apiParam   {String}         nation             民族
     * @apiParam   {String}         party              党派
     * @apiParam   {String}         post               职务
     * @apiParam   {String}         title              职称
     * @apiParam   {String}         orgNm              所在单位名称
     * @apiParam   {List(String)}   isJobList          (数组)是否在职
     * @apiParam   {String}         studyMajor         所学专业
     * @apiParam   {String}         currentMajor       现从事专业
     * @apiParam   {String}         degree             最高学历
     * @apiParam   {List(String)}   allowanceTpList    (数组)享受津贴类别
     * @apiParam   {String}         cv                 简历
     * @apiParam   {Date}           tsBgTm             (开始时间)时间戳
     * @apiParam   {Date}           tsEdTm             (结束时间)时间戳
     * @apiParam   {String}         personCardNo       身份证
     * @apiParam   {String}         personTel          联系方式
     * @apiParam   {String}         personAddress      家庭住址
     * @apiSuccess {Integer}        status             通常1或者>1:删除成功;0:没有符合条件的数据.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("by-filter")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response deleteByFilter(WremPersonBQo filter) {
        LOGGER.info("根据条件删除 应急专家及管理人员基本信息表,参数 WremPersonBQo:{}", filter);
        Integer rows = wremPersonBService.deleteByFilter(filter);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }
}
